nextNumber :: Integer -> Integer
nextNumber x = x + ((read.reverse.show) x)

isPalindrome :: Integer -> Bool
isPalindrome x = s == reverse s
	where s = show x
	
isLychrel (x,y)
	| y == 50 = True
	| isPalindrome z = False
	| otherwise = isLychrel (z,y+1)
	where
		z = nextNumber x
		
euler_055 = length $ filter (\x->(isLychrel (x,0))) [1..10000]